﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace QLTV.Forms.KhaiBao
{
    public partial class frmNhatKy : DevExpress.XtraEditors.XtraForm
    {
        public frmNhatKy()
        {
            InitializeComponent();
        }

        private void frmNhatKy_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dsCrew.tblViewCrew' table. You can move, or remove it, as needed.
            this.tblViewCrewTableAdapter.Fill(this.dsCrew.tblViewCrew);
            // TODO: This line of code loads data into the 'dsVessel.tblVessel' table. You can move, or remove it, as needed.
            this.tblVesselTableAdapter.Fill(this.dsVessel.tblVessel);
            // TODO: This line of code loads data into the 'dsCrew.tblAssignmentLog' table. You can move, or remove it, as needed.
            this.tblAssignmentLogTableAdapter.Fill(this.dsCrew.tblAssignmentLog);
            //  linqServerModeSource1.ElementType= typeof(Database.a)
        }

        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SaveFileDialog f = new SaveFileDialog();
            f.Filter = "Excel Files | *.xls";
            if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK && f.FileName != "")
            {
                
                bandedGridView1.ExportToXls(f.FileName);
            }
        }
    }
}